<template>
  <view class="search-container" @click="clickHandel" :style="{'background-color':bgcolor}">
    <view class="search-box" :style="{'border-radius':radius+'px'}">
      <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    props:{
      bgcolor:{
        type:String,
        default:'#C00000'
      },
      radius:{
        type:Number,
        default:18
      }
    },
    name:"my-search",
    data() {
      return {
        
      };
    },
    methods:{
      clickHandel(){
        this.$emit('myclick')
      }
    }
  }
</script>

<style lang="scss">
.search-container{
  height:50px;
  padding:0 10px;
  display: flex;
  align-items:center;
  .search-box{
    width:100%;
    height:35px;
    background:#fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    .placeholder{
      margin-left:5px;
    }
  }
}
</style>
